<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <form action="" method="POST">
        请输入年份：
        <input type="text" name="year">
        <input type="submit" value="提交">
    </form>
</body>

</html>
<?php 
if(!empty($_POST)){
    $year=$_POST['year'];
    // echo $year;
    if($year%4==0&&$year%100!=0||$year%400==0){
        echo $year.'是闰年';
    }else{
        echo $year.'不是闰年';
    }
    
}else{
    echo '请输入年份';
}

?>